Developer --> Technical Publications

     


Setting and Retrieving Keychain Information

The Keychain Manager enables you to create and display dialog boxes that allow a user to set up and access their keychain, as well as to enable them to supply and modify passwords. It provides these dialog boxes to ensure user interaction in creating and opening keychains. For security reasons, a keychain cannot be unlocked programmatically. When the user clicks on the Keychain icon on the desktop a dialog box appears, asking whether the user wants to create a new keychain, unlock an existing keychain, or change the identity of an existing keychain.

You can call the function KCChangeSettings to display a dialog that enables the user to change the name, password, and settings associated with a keychain. Pass NULL in the keychain parameter to indicate the default keychain.

The function KCGetStatus retrieves the status of a keychain. It passes back a bit mask that you can test to determine the status of the specified keychain. See "Keychain Status Mask Constants" for a description of this mask. The function KCGetKeychainName retrieves the name of a keychain.


© 2000 Apple Computer, Inc. (Last Updated 07 April 00)